package com.project.bean;

import java.time.LocalDate;

public class TradeBean {
    /**
     * 用户id
     */
    private int id;
    /**当前时间*/
    private LocalDate time =LocalDate.now();
    /**描述*/
    private String describle;
    /**余额*/
    private double account;
    /**用户外键*/
    private UserBean userBean;

    public TradeBean() {
    }
    public TradeBean(String describle,double account,String code) {
        this.describle=describle;
        this.account=account;
        userBean=new UserBean();
        userBean.setUserName(code);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public LocalDate getTime() {
        return time;
    }

    public void setTime(LocalDate time) {
        this.time = time;
    }

    public String getDescrible() {
        return describle;
    }

    public void setDescrible(String describle) {
        this.describle = describle;
    }

    public double getAccount() {
        return account;
    }

    public void setAccount(double account) {
        this.account = account;
    }

    public UserBean getUserBean() {
        return userBean;
    }

    public void setUserBean(UserBean userBean) {
        this.userBean = userBean;
    }

    @Override
    public String toString() {
        return "TradeBean{" +
                "id=" + id +
                ", time=" + time +
                ", describle='" + describle + '\'' +
                ", account=" + account +
                ", userBean=" + userBean +
                '}';
    }
}
